<?php
class autoLoader{
	public static function moduleAutoLoader($class){
		$path = Consts::getRealPath()."application/modules/{$class}.class.php";
		if (is_readable($path)){
			require $path;
		}
	}
	
	public static function controllerAutoLoader($class){
		$path = Consts::getRealPath()."application/controllers/{$class}.class.php";
		if (is_readable($path)){
			require $path;
		}
	}
	
	public static function includeCoreAutoLoader($class){
		$path = Consts::getRealPath()."includes/Cores/{$class}.php";
		if (is_readable($path)){
			require $path;
		}
	}
	
}
spl_autoload_register('autoLoader::includeCoreAutoLoader');
spl_autoload_register('autoLoader::controllerAutoLoader');
spl_autoload_register('autoLoader::moduleAutoLoader');
